# -*-  coding:utf-8 -*- 
# Author : lihongliang


menu ={
    "广东省":{
        "珠海市":{
            "香洲区":{"香洲一区":["香洲小区"],"香洲五区":{},"香洲十区":{}},
            "斗门区":["斗门一区","斗门五区","斗门十区"],
            "金湾区":["金湾一区","金湾五区","金湾十区"]
        },
        "广州市":{
            "天河区":["天河一区","天河五区","天河十区"],
            "番禺区":["香洲一区","香洲五区","香洲十区"],
            "花都区":["香洲一区","香洲五区","香洲十区"]
        },
        "深圳市":{
            "罗湖区":["罗湖一区","罗湖五区","罗湖十区"],
            "福田区":["福田一区","福田五区","福田十区"],
            "南山区":["南山一区","南山五区","南山十区"]
        }
    },
    "陕西省":{
        "西安市":{
            "新城区",
            "未央区",
            "雁塔区"
        },
        "咸阳市":{
            "秦都区",
            "杨陵区",
            "渭城区"
        },
        "宝鸡市":{
            "渭滨区",
            "金台区",
            "陈仓区"
        }
    },
    "四川省":{
        "成都市":{
            "锦江区",
            "青羊区",
            "金牛区"
        },
        "自贡市":{
            "自流井区",
            "贡井区",
            "大安区"
        },
        "德阳市":{
            "中江县",
            "罗江县",
            "广汉市"
        }
    }
}




current_layer = menu
last_layer = []
while True:
    for k  in current_layer:
        print(k)

    choice = input("》：").strip()
    if choice  in current_layer:
        if  current_layer[choice]:
            last_layer.append(current_layer)
            current_layer = current_layer[choice]
        else:
            print("当前是最后一层")
    elif choice =="b":
        if len(last_layer) !=0:
            current_layer = last_layer.pop()
        else:
            print("最顶层")